home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: argc/argv & switches
- Date: 8 Mar 96 15:40:37 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.826299637@rscernix>
- References: <4h2j8j$9gn@milo.freenet.vancouver.bc.ca> <danpop.825593142@rscernix> <Dnt8r5.F3w@bear.wn.bawue.de>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <Dnt8r5.F3w@bear.wn.bawue.de> jo@bear.wn.bawue.de (Joerg Sommrey) writes:
-
- >In <danpop.825593142@rscernix> danpop@mail.cern.ch (Dan Pop) writes:
- >
- >>Note that *++argv[0] is technically incorrect, because there is no
- >>guarantee that argv[0] can be modified by the program, it can be legally
- >>stored in a read only memory segment.
- >
- >Does this mean there is an incorrect example in K&R2?
- >At p.117f they use *++argv[0].
-
- Yes, the example at page 117 in K&R2 is incorrect. It invokes undefined
- behaviour. They probably didn't update the example from K&R1 to comply
- with ANSI C.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-